package com.tust.app.dao;

import com.tust.app.domain.News;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface NewsMapper {
    List<News> selectAllNews() throws Exception;
    News selectNewsById(Integer id) throws Exception;
    List<News> selectNewsByTitle(@Param("title") String title) throws Exception;
    int writeNews(News news);
    boolean updateNewsById(News news) throws Exception;
    boolean deleteNewsById(Integer id) throws Exception;
}
